home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 May: Tool Chest / Dev.CD May 98 TC.toast / Tool Chest / QuickTime / QuickTime Tools / DrawTextCodec Example / Sample code / StdCompression.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-12  |  2.7 KB  |  122 lines  |  [TEXT/KAHL]

  1.  
  2. /************************************************************
  3.  
  4.  StdCompression.h
  5.  
  6.  Copyright Apple Computer, Inc. 1991
  7.  All rights reserved
  8.  
  9. ************************************************************/
  10.  
  11.  
  12. #ifndef    __STDCOMPRESSION__
  13. #define    __STDCOMPRESSION__
  14.  
  15. #ifndef __IMAGECOMPRESSION__
  16. #include "ImageCompression.h"
  17. #endif
  18.  
  19.  
  20. typedef struct {
  21.     long            flags;
  22.     CodecType        theCodecType;
  23.     CodecComponent    theCodec;
  24.     CodecQ            spatialQuality;
  25.     CodecQ            temporalQuality;
  26.     short            depth;
  27.     Fixed            frameRate;
  28.     long            keyFrameRate;
  29.     long            reserved1;
  30.     long            reserved2;
  31. } SCParams;
  32.  
  33.  
  34. typedef pascal Boolean (*SCModalFilterProcPtr)(DialogPtr theDialog,
  35.     EventRecord *theEvent, short *itemHit, long refcon);
  36.  
  37. typedef pascal short (*SCModalHookProcPtr)(DialogPtr theDialog,
  38.     short itemHit, SCParams *params, long refcon);
  39.  
  40.  
  41. /*
  42.  *    Flags for SCParams.
  43.  */
  44. #define    scShowMotionSettings    (1L<<0)
  45. #define    scListEveryCodec        (1L<<1)
  46. #define    scAllowZeroFrameRate    (1L<<2)
  47. #define    scAllowZeroKeyFrameRate    (1L<<3)
  48. #define    scShowBestDepth            (1L<<4)
  49.  
  50.  
  51. /*
  52.  *    Possible test flags for setting test image.
  53.  */
  54. #define    scPreferCropping            (1<<0)
  55. #define    scPreferScaling                (1<<1)
  56. #define scPreferScalingAndCropping    (scPreferScaling + scPreferCropping)
  57.  
  58.  
  59. /*
  60.  *    Dimensions of the image preview box.
  61.  */
  62. #define    scTestImageWidth    80
  63. #define    scTestImageHeight    80
  64.  
  65.  
  66. /*
  67.  *    Possible items returned by hookProc.
  68.  */
  69. #define    scSettingsChangedItem    -1
  70. #define    scOKItem                1
  71. #define    scCancelItem            2
  72. #define    scCustomItem            3
  73.  
  74.  
  75. #ifdef __cplusplus
  76. extern "C" {
  77. #endif
  78.  
  79. pascal ComponentInstance
  80. OpenStdCompression(void);
  81.  
  82. pascal ComponentResult
  83. SCGetCompressionExtended(ComponentInstance ci,SCParams *params,Point where,
  84.     SCModalFilterProcPtr filterProc,SCModalHookProcPtr hookProc,long refcon,StringPtr customName)
  85.     = {0x2F3C,24,1,0x7000,0xA82A};
  86.  
  87. pascal ComponentResult
  88. SCGetCompression(ComponentInstance ci,SCParams *params,Point where)
  89.     = {0x42A7,0x42A7,0x42A7,0x42A7,0x2F3C,24,1,0x7000,0xA82A};
  90.  
  91. pascal ComponentResult
  92. SCPositionRect(ComponentInstance ci,Rect *rp,Point *where)
  93.     = {0x2F3C,8,2,0x7000,0xA82A};
  94.  
  95. pascal ComponentResult
  96. SCPositionDialog(ComponentInstance ci,short id,Point *where)
  97.     = {0x2F3C,6,3,0x7000,0xA82A};
  98.  
  99. pascal ComponentResult
  100. SCSetTestImagePictHandle(ComponentInstance ci, PicHandle testPict, Rect *testRect, short testFlags)
  101.     = {0x2F3C,10,4,0x7000,0xA82A};
  102.  
  103. pascal ComponentResult
  104. SCSetTestImagePictFile(ComponentInstance ci, short testFileRef, Rect *testRect, short testFlags)
  105.     = {0x2F3C,8,5,0x7000,0xA82A};
  106.  
  107. pascal ComponentResult
  108. SCSetTestImagePixMap(ComponentInstance ci, PixMapHandle testPixMap, Rect *testRect, short testFlags)
  109.     = {0x2F3C,10,6,0x7000,0xA82A};
  110.  
  111. pascal ComponentResult
  112. SCGetBestDeviceRect(ComponentInstance ci, Rect *r) 
  113.      = {0x2F3C,4,7,0x7000,0xA82A};
  114.  
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118.  
  119.  
  120. #endif __STDCOMPRESSION__
  121.  
  122.